<template>
  <div class="myData">
    <Card>
    <Avatar icon="ios-person" />
    <Form :model="myData" :label-width="85">
      <FormItem label="账号">
        <Input v-model="myData.userName" placeholder="账号" disabled></Input>
      </FormItem>
      <FormItem label="昵称">
        <Input v-model="myData.uNick" placeholder="请输入昵称" :disabled="isDisable"></Input>
      </FormItem>
      <FormItem label="vip信息">
        <Input v-model="myData.vipTime" disabled></Input>
      </FormItem>
      <FormItem label="个性签名">
        <Input v-model="myData.userInt" placeholder="这个人很懒，什么都没留下！" :disabled="isDisable"></Input>
      </FormItem>
    </Form>
    </Card>
  </div>
</template>

<script>
  export default {
    name: "myData",
    props: {
      look:{
        type:Number,
      }
    },
    data() {
      return {
        myData:{
          userName:'',
          uNick:'',
          vipTime:'',
          userInt:'',
        },
        isDisable:false,
      }
    },
    mounted() {
      this.myData.vipTime = this.$getCookie("vipTime")
      this.myData.userName = this.$getCookie("userName")
      this.myData.uNick = this.$getCookie("uNick")
      this.myData.userInt = this.$getCookie("userInt")
      this.$emit('onChange',this.myData)
      if (!this.look){
        this.isDisable = true
      }
    }
  }
</script>

<style scoped>
  .myData{
    width: 500px;
    margin-top: 25px;
    margin-bottom: 25px;
  }
</style>
